﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="inner.aspx.cs" Inherits="GDIT.page.manage.InnerNet.inner" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>IP范围</title>
    <link href="../../../css/m_inner.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div class="all">




<!--下面用Repeater来绑定-->
<ul class="ipList">
    <asp:Repeater ID="rptIp" runat="server">
        <ItemTemplate>
            <li>
                <%--<asp:HiddenField ID="hdfId" runat="server" Value="<%#Eval("id") %>" />--%>
                从&ensp;<asp:TextBox ID='button1' runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "IternalIPStart") %>' CssClass="ip"></asp:TextBox>
                &ensp;至&ensp;<input type="text" class="ip" value='<%#DataBinder.Eval(Container.DataItem, "IternalIPEnd") %>' />
                &ensp;&ensp;<asp:LinkButton ID="btnDelete" runat="server" title="编辑" OnClientClick="ip_click" CssClass="operate"></asp:LinkButton>
            </li>
        </ItemTemplate>
    </asp:Repeater>
</ul>


<%--<a href="javascript:void(0);" class="add" onclick="add_click();"></a>--%>




<div class="hyaline"></div>
<div class="popup">
    
    <ul class="ipAdd">
        <li>从&ensp;<asp:TextBox ID="txtLeft" runat="server" CssClass="left"></asp:TextBox></li>
        <li>至&ensp;<asp:TextBox ID="txtRight" runat="server" CssClass="right"></asp:TextBox></li>
    </ul>
    <%--<asp:LinkButton ID="btnAdd" runat="server" CssClass="btnAdd" 
        onclick="btnAdd_Click">添&nbsp;加</asp:LinkButton>--%>

    <a href="javascript:void(0);" class="close" onclick="ClosePopup();"></a>
    <asp:LinkButton ID="btnSave" runat="server" NavigateUrl="javascript:void(0);" CssClass="save" Title="保存" OnClick="btnSave_OnClick"></asp:LinkButton>
    <asp:LinkButton ID="btnAdd" runat="server" NavigateUrl="javascript:void(0);" CssClass="add" Title="添加" OnClick="btnAdd_OnClick"></asp:LinkButton>
    <asp:LinkButton ID="btnDelete" runat="server" NavigateUrl="javascript:void(0);" CssClass="delete" Title="删除" OnClick="btnDelete_OnClick"></asp:LinkButton>

</div>

<script type="text/javascript">
    function Ready() {

    }

    ///弹出用于添加ip的窗口
    function ip_click() {
        GetElementsByClass("hyaline").style.display = "block";
        GetElementsByClass("popup").style.display = "block";
    }

    ///关闭用于添加ip的窗口
    function ClosePopup() {
        GetElementsByClass("hyaline").style.display = "none";
        GetElementsByClass("popup").style.display = "none";
    }

    /*根据样式获取标签集合*/
    function GetElementsByClass(className) {
        var events = new Array();
        var allEvents = document.getElementsByTagName("*");
        for (var i = 0; i < allEvents.length; i++) {
            var classNames = allEvents[i].className.split(" ");
            for (var j = 0; j < classNames.length; j++) {
                if (classNames[j] == className) {
                    events[events.length] = allEvents[i];
                }
            }
        }
        return events;
    }
</script>




</div>
</form>
</body>
</html>
